import com.mjawor.lpgroovy.vars.IntVar
import com.mjawor.lpgroovy.SumImpl
import com.mjawor.lpgroovy.vars.FloatVar
import org.junit.Test
import com.mjawor.lpgroovy.vars.BooleanVar
import com.mjawor.lpgroovy.xVarImpl


class SumTest {

	@Test
	public void testOperators() {
        def i = new IntVar('x')
        def f = new FloatVar('y')
        def b = new BooleanVar('z')

        def xi = new xVarImpl(i)
        def xf = new xVarImpl(f)
        def xb = new xVarImpl(b)

		def s1 = new SumImpl(xi,xf);
		def s2 = new SumImpl(xb);

        assert s1 + s2 == new SumImpl(xi,xf,xb)
        //assert s1 - s2 == new Sum(xi,xf,-xb)
        println (-xb)
	}
}